package com.meida.module.bus.provider.api.service;

import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;

import java.util.Date;

public class tt {
    public static void main(String[] args) {
        String tt = null;
        Date calDate = null == tt ? new Date() : DateUtil.parse(String.valueOf(tt), "yyy-MM");
        String calDateBe = DateUtil.format(DateUtil.offset(calDate, DateField.MONTH, -1), "yyyy-MM");
        String calDateThisMonth = DateUtil.format(calDate, "yyyy-MM");
        System.out.println("calDate:" +calDate);
        System.out.println("calDateBe:" + calDateBe);
        System.out.println("calDateThisMonth:" + calDateThisMonth);
    }
}
